﻿namespace AddressBook.Business.Event
{
  #region "Using Statements"
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;

  using Csla;
  using Csla.Data;
  #endregion

  [Serializable]
  public class LocationInfo : ReadOnlyBase<LocationInfo>
  {
		#region "Business Methods"

		#region "Private Static Member Variables"

		private static PropertyInfo<int> IdProperty = RegisterProperty<int>(l => l.Id);
		private static PropertyInfo<string> FirstNameProperty = RegisterProperty<string>(l => l.Name);

		#endregion

		#region "Public Properties"

		public int Id
		{
			get { return GetProperty(IdProperty); }
			private set { LoadProperty(IdProperty, value); }
		}

		public string Name
		{
			get { return GetProperty(FirstNameProperty); }
			private set { LoadProperty(FirstNameProperty, value); }
		}

		#endregion

		public override string ToString()
		{
			return this.Name;
		}

		#endregion

		#region "Constructors"

		internal LocationInfo(int id, string name)
    {
      this.Id = id;
			this.Name = name;
		}

		#endregion
  }
}
